home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
UTIL
/
TouchMe 1.1.1.sit
/
touchMe 1.11 Folder
/
scripts
/
sample 5
< prev
next >
Wrap
Text File
|
1996-08-08
|
2KB
|
50 lines
-- Sample AppleScripts for touchMe, 1996 (C) Mizutori Tetsuya
-- A droplet to change the date time stamp of every file {in the given folder(s)}
-- that copies its modification date to the creation date by file-by-file.
-- How to compile this AppleScript: execute "Save As Run-Only..." command!
-- Usage1: Run this droplet to select a target folder in the prompt dialog.
-- Usage2: Drag & drop the target folders (or files) onto this droplet icon.
-- Thanks to Jim van Zee for encouraging me to write this wonderful script.
-- He had some problems on using the Macintosh "tar" application to extract
-- a tar file which was created on Unix machine. He found that the extracted
-- files have their original time stamp as the modification date, whereas the
-- current time as its creation date. Wow, the file was created in the future!
-- This sample script can correct the creation date by the modification date.
tell me to open {(choose folder)}
--tell me to open {(choose file)}
on open (docList)
tell application "touchMe"
activate
set prefs creation to {enabled:true, flag:exact}
set prefs modification to {enabled:false}
end tell
--
repeat with theItem in the docList
if the folder of (info for theItem) is true then
repeat with theFilename in the list folder theItem
tell me to SetDateTimeStamp by (alias ((theItem as string) & theFilename))
end repeat
else
tell me to SetDateTimeStamp by theItem
end if
end repeat
--
tell application "touchMe"
quit
end tell
end open
to SetDateTimeStamp by theFile
tell application "touchMe"
set theStamp to fetch theFile
-- set theDate to the creation date of theStamp
set theDate to the modification date of theStamp
set prefs creation to {value:theDate}
touch theFile
end tell
end SetDateTimeStamp